package org.cyb.demo.service.impl;

import org.cyb.demo.dao.VideoMapper;
import org.cyb.demo.domain.Section;
import org.cyb.demo.domain.Video;
import org.cyb.demo.service.VideoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("videoService")
public class VideoServiceImpl implements VideoService {

    @Autowired
    private VideoMapper videoMapper;

    @Override
    public void add(Video video, Section section) {
        videoMapper.insert(video,section);
    }

    @Override
    public Video findOneByName(Video video) {
        return videoMapper.selectOneByName(video);
    }
}
